package com.ibeetl.admin.aod.service.excel.processor;

import com.ibeetl.admin.aod.entity.AodIndustry;
import com.ibeetl.admin.aod.service.AodIndustryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 行业类别导入处理器
 * 暂时先屏蔽导入按钮
 * @author caobingbing
 */
@Component
@Transactional
@Deprecated
public class AodIndustryImportProcessor extends AbstractImportProcessor<AodIndustry> {

    @Autowired
    protected AodIndustryService aodIndustryService;

    @Override
    protected void postProcess(List<AodIndustry> dataList) {
        for (AodIndustry aodIndustry : dataList) {
            // 此处会有 已存在的行业 导致全部出错，暂时先屏蔽导入按钮
            aodIndustryService.saveUnique(aodIndustry);
        }
    }
}
